import Vue from 'vue'
import App from './App.vue'
import "./assets/icon/iconfont.css"
import VueRouter from 'vue-router'
import Vant from 'vant';
import 'vant/lib/index.css';
import axios from 'axios'
// import VueAxios from 'vue-axios'
import { PullRefresh } from 'vant';
import Patrol from "./views/patrol"
import Record from "./views/record"
import SeeInfo from "./views/seeinfo"

Vue.prototype.$bus = new Vue()

Vue.config.productionTip = false

Vue.use(Vant);

// Vue.use(VueAxios, axios);
Vue.prototype.axios= axios;
axios.defaults.baseURL = 'http://192.168.1.236:9095'; // 本地
axios.defaults.headers.common['Authorization'] = 'Bearer 172ebfad-7b43-4027-9b95-87592391fa03';

// axios.defaults.baseURL = android.getBaseUrl(); // 线上服务器
// axios.defaults.headers.common['Authorization'] = android.getToken();

Vue.use(PullRefresh, );

Vue.use(VueRouter)

let router = new VueRouter({
    routes: [
        //一个个对象
        {
            path: '/',
            component: Patrol
        },
        {
            path: '/record',
            component: Record
        },
        {
            path: '/seeinfo',
            component: SeeInfo
        }
    ]
});

new Vue({
    router: router,
    render: h => h(App),
}).$mount('#app')